package com.scs.application.modules.wm.service;

import com.scs.application.core.query.QueryContext;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.sys.model.PageResult;
import com.scs.application.modules.wm.dto.DailyOrderItemDTO;
import com.scs.application.modules.wm.dto.WorkOrderItemDTO;
import com.scs.application.modules.wm.entity.Stock;
import com.scs.application.modules.wm.entity.WorkOrderItem;

import java.util.List;

/**
 * <p>
 * 入库单明细 Service
 * </p>
 */

public interface WorkOrderItemService extends IBaseService<WorkOrderItem> {

    List<WorkOrderItemDTO> workOrderItemBySN(String sn);

    List<WorkOrderItemDTO> orderBarcodeBySN(String sn);

    List<DailyOrderItemDTO> workOrderItemOmoc(List<String> ids);

    PageResult pageForRedType(QueryContext queryContext);

    List<Stock> selectOprtBag();

    /**
     * 根据耗材ID 查询 work_order_item
     *
     * @param matrId
     * @return
     */
    List<WorkOrderItemDTO> getListByMatrId(String matrId);

    /**
     * 根据库存id集合  flagOmoc查询 供应商出库明细总数量
     * @param stockIds
     * @param flagOmoc
     * @return double
     */
    double getOutspItemSkuQtySum(List<String> stockIds, Boolean flagOmoc);

    /**
     * 获取某段时间内的入库数量
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumSkuQty(String startDate, String endDate);

    /**
     * 获取某段时间内的入库金额
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumAmount(String startDate, String endDate);
}
